{% for comment in comments %}
    <li>
        <div class="comment-parent">
            <img src="{{ comment.user.avatar }}" alt="{{ comment.user.username }}"/>
            <div class="info">
                <span class="username">{{ comment.user.username }}</span>
                {% if comment.user.pk == article.author.pk %}
                    <span class="blogger">博主</span>
                {% endif %}
            </div>
            <div class="comment-content">{{ comment.content|safe }}</div>
            <p class="info info-footer">
                <span class="comment-time">{{ comment.time }}</span>
                <a href="javascript:;" class="btn-reply" data-targetid="{{ comment.nid }}"
                   data-targetname="{{ comment.user.username }}">回复</a>
            </p>
        </div>
        {% for children in comment.children %}
            <div class="comment-child">
                <img src="{{ children.user.avatar }}" alt="{{ children.user.username }}"/>
                <div class="info">
                    <span class="username">{{ children.user.username }}</span>
                    {% if children.user.pk == article.author.pk %}
                        <span class="blogger">博主</span>
                    {% endif %}
                    <span style="padding-right: 0; margin-left: -5px">回复</span>
                    <span class="username">{{ children.parentuser }}</span>
                </div>
                <div class="comment-content">{{ children.content|safe }}</div>
                <p class="info">
                    <span class="comment-time">{{ children.time }}</span>
                    <a href="javascript:;" class="btn-reply" data-targetid="{{ children.nid }}"
                       data-targetname="{{ children.user.username }}">回复</a>
                </p>
            </div>
        {% endfor %}
    </li>
{% endfor %}
